CC = g++
objects = TFrame.o
bindir = ./bin/
srcdir = ./src/
incdir = ./include/
BFS = BFSTask.o
DBITVEC = dbitvec.o
TRANSLATE = translate.o
generate = generate
PROGRAM = program
FLAG = -g -Wno-deprecated
.PHONY: clean

$(bindir)$(PROGRAM): $(srcdir)main.cpp $(bindir)$(BFS) $(bindir)$(DBITVEC) $(bindir)$(objects) $(bindir)$(TRANSLATE)
	$(CC) $(FLAG) -o $@ $^ -I $(incdir) -pthread

Generate: $(bindir)$(generate)

$(bindir)$(generate): $(srcdir)generate.cpp
	$(CC) -O3 $(FLAG) -o $@ $^ -I $(incdir) -pthread

$(bindir)$(BFS): $(srcdir)BFSTask.cpp $(incdir)BFSTask.h
	$(CC) $(FLAG) -c -o $@ $< -I $(incdir) -pthread

$(bindir)$(DBITVEC): $(srcdir)dbitvec.cpp $(incdir)dbitvec.h
	$(CC) $(FLAG) -c -o $@ $< -I $(incdir) -pthread

$(bindir)$(TRANSLATE): $(srcdir)translate.cpp $(incdir)translate.h
	$(CC) -O3 $(FLAG) -c -o $@ $< -I $(incdir) -pthread -lboost_graph

$(bindir)$(objects): $(srcdir)TFrame.cpp $(incdir)TFrame.h $(incdir)Task.h
	$(CC) $(FLAG) -c -o $@ $< -I $(incdir) -pthread -lboost_graph

clean:
	rm -rf $(bindir)*
